package cn.yuanqiao.cqbc.inspectionLog.domain;

import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.core.domain.BaseEntity;

/**
 * 日志详情对象 A001_YQ_INSPECTION_LOG_DETAILS
 * 
 * @author xy
 * @date 2024-06-20
 */
public class LogDetails {
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQ_INSPECTION_LOG_DETAILS";

    public LogDetails() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("TenantCode is null");
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }
    /** id */
    private Long id;

    /** 批次号 */
    @Excel(name = "批次号")
    private Long pId;

    /** 档案标题 */
    @Excel(name = "档案标题")
    private String title;

    /** 档号 */
    @Excel(name = "档号")
    private String dh;

    /** 检测结果 */
    @Excel(name = "检测结果")
    private String detectionResult;

    /** 四性详情Id */
    @Excel(name = "四性详情Id")
    private Long detailsId;

    private Long dataId;

    private String dataPath;


    private String createTime;

    private String tableName;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setpId(Long pId) 
    {
        this.pId = pId;
    }

    public Long getpId() 
    {
        return pId;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setDh(String dh) 
    {
        this.dh = dh;
    }

    public String getDh() 
    {
        return dh;
    }
    public void setDetectionResult(String detectionResult) 
    {
        this.detectionResult = detectionResult;
    }

    public String getDetectionResult() 
    {
        return detectionResult;
    }
    public void setDetailsId(Long detailsId) 
    {
        this.detailsId = detailsId;
    }

    public Long getDetailsId() 
    {
        return detailsId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
    public Long getDataId() {
        return dataId;
    }

    public void setDataId(Long dataId) {
        this.dataId = dataId;
    }

    public String getDataPath() {
        return dataPath;
    }

    public void setDataPath(String dataPath) {
        this.dataPath = dataPath;
    }


    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("pId", getpId())
            .append("title", getTitle())
            .append("dh", getDh())
            .append("detectionResult", getDetectionResult())
            .append("detailsId", getDetailsId())
            .toString();
    }
}
